﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UnnamedPodcastLibrary
{
    public static class FeedState
    {
        public static string UriSaved = "UriSaved";
        public static string DownloadStarted = "DownloadStarted";
        public static string DownloadCompleted = "DownloadCompleted";


        public static IEnumerable<string> States
        {
            get
            {
                return new string[]
                {
                    UriSaved,
                    DownloadStarted,
                    DownloadCompleted
                };
            }
        }

        public static bool IsValid(string feedState)
        {
            return States.Count((validState) => { return validState.Equals(feedState, StringComparison.OrdinalIgnoreCase); }) > 0;
        }
    }

}
